﻿
using MCPlatform.MotionLib.Base.AssitantClass;
using Panuon.WPF;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MCPlatform.Communicate.TcpIp
{
    public class TcpClientModel : NotifyPropertyChangedBase, INameProvider
    {
        [Newtonsoft.Json.JsonIgnore]
        public NTcpClient NTcpClient { get => _NTcpClient; set => Set(ref _NTcpClient, value); }
        [Newtonsoft.Json.JsonIgnore]
        private NTcpClient _NTcpClient;
        public string ControlName { get => _ControlName; set => Set(ref _ControlName, value); }
        private string _ControlName = "视觉通讯";
        public string IPAddr { get => _IPAddr; set => Set(ref _IPAddr, value); }
        private string _IPAddr = "127.0.0.1";
        public int Port { get => _Port; set => Set(ref _Port, value); }
        private int _Port;

        public string ClientName { get => _ClientName; set => Set(ref _ClientName, value); }
        private string _ClientName = "Vision";

        public bool IsAutoRetry { get => _IsAutoRetry; set => Set(ref _IsAutoRetry, value); }
        public bool _IsAutoRetry = false;


        public TcpClientModel()
        {
            _NTcpClient = new NTcpClient(this);
        }
    }
}
